/**
 * Created by meiguizhinian on 2018/7/5
 * Copyright © 2018 lixiaolong. All rights reserved.
 */

//cocos2dx class
LLDialog = cc.LayerColor.extend({
	ctor: function (form) {
		this._super(cc.color(0,0,0,0));
		this._formName = form;
		this._formNode = ivy.UIManager.getInstance().popUpFormByName(this._formName);
	},

	close : function (delay=0) {
		if (delay===0) {
			ivy.UIManager.getInstance().removePopUpFormByName(this._formName);
			this.removeFromParent(true);
		} else {
			this.scheduleOnce(function () {
				ivy.UIManager.getInstance().removePopUpFormByName(this._formName);
				this.removeFromParent(true);
			}.bind(this), delay, "delay_close")
		}
	},
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	_formName : "",
	_formNode : null,
});
